\section{RtError Class Reference}
\label{class_rt_error}\index{RtError@{RtError}}


Exception handling class for \doxyref{RtAudio}{p.}{class_rt_audio} \& RtMidi.  




{\ttfamily \#include $<$RtError.h$>$}

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum {\bf Type} \{ \par
{\bf WARNING}, 
{\bf DEBUG\_\-WARNING}, 
{\bf UNSPECIFIED}, 
{\bf NO\_\-DEVICES\_\-FOUND}, 
\par
{\bf INVALID\_\-DEVICE}, 
{\bf MEMORY\_\-ERROR}, 
{\bf INVALID\_\-PARAMETER}, 
{\bf INVALID\_\-USE}, 
\par
{\bf DRIVER\_\-ERROR}, 
{\bf SYSTEM\_\-ERROR}, 
{\bf THREAD\_\-ERROR}
 \}
\begin{DoxyCompactList}\small\item\em Defined \doxyref{RtError}{p.}{class_rt_error} types. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf RtError} (const std::string \&message, {\bf Type} type=RtError::UNSPECIFIED)  throw ()\label{class_rt_error_aa479a305ccbe56be0fd9137b9b405a37}

\begin{DoxyCompactList}\small\item\em The constructor. \item\end{DoxyCompactList}\item 
virtual {\bf $\sim$RtError} (void)  throw ()\label{class_rt_error_a6793e03386e7e69ffafb65a296dfa48c}

\begin{DoxyCompactList}\small\item\em The destructor. \item\end{DoxyCompactList}\item 
virtual void {\bf printMessage} (void)  throw ()\label{class_rt_error_ada41f7472122f45bc5b4677f066e0943}

\begin{DoxyCompactList}\small\item\em Prints thrown error message to stderr. \item\end{DoxyCompactList}\item 
virtual const {\bf Type} \& {\bf getType} (void)  throw ()\label{class_rt_error_a4ee7df9728d73f533afbaddcd9ca4d9c}

\begin{DoxyCompactList}\small\item\em Returns the thrown error message type. \item\end{DoxyCompactList}\item 
virtual const std::string \& {\bf getMessage} (void)  throw ()\label{class_rt_error_ac7f467788e29d246333d7af050801164}

\begin{DoxyCompactList}\small\item\em Returns the thrown error message string. \item\end{DoxyCompactList}\item 
virtual const char $\ast$ {\bf what} (void) const   throw ()\label{class_rt_error_aeb843b7a7785d66061c61ebfc29e7e9d}

\begin{DoxyCompactList}\small\item\em Returns the thrown error message as a c-\/style string. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
std::string {\bfseries message\_\-}\label{class_rt_error_a6f63960ea24c5281cddd244d053d479c}

\item 
{\bf Type} {\bfseries type\_\-}\label{class_rt_error_ab4f7a5e085eb9fce8e1d264944e53ab3}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Exception handling class for \doxyref{RtAudio}{p.}{class_rt_audio} \& RtMidi. The \doxyref{RtError}{p.}{class_rt_error} class is quite simple but it does allow errors to be \char`\"{}caught\char`\"{} by \doxyref{RtError::Type}{p.}{class_rt_error_ab04667aae01bffc354a9ac6bda6903ac}. See the \doxyref{RtAudio}{p.}{class_rt_audio} and RtMidi documentation to know which methods can throw an \doxyref{RtError}{p.}{class_rt_error}. 

\subsection{Member Enumeration Documentation}
\index{RtError@{RtError}!Type@{Type}}
\index{Type@{Type}!RtError@{RtError}}
\subsubsection[{Type}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf RtError::Type}}\label{class_rt_error_ab04667aae01bffc354a9ac6bda6903ac}


Defined \doxyref{RtError}{p.}{class_rt_error} types. 

\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{WARNING@{WARNING}!RtError@{RtError}}\index{RtError@{RtError}!WARNING@{WARNING}}\item[{\em 
WARNING\label{class_rt_error_ab04667aae01bffc354a9ac6bda6903aca3a1603c24a56cbdaf5f8ae4ddcb86398}
}]A non-\/critical error. \index{DEBUG\_\-WARNING@{DEBUG\_\-WARNING}!RtError@{RtError}}\index{RtError@{RtError}!DEBUG\_\-WARNING@{DEBUG\_\-WARNING}}\item[{\em 
DEBUG\_\-WARNING\label{class_rt_error_ab04667aae01bffc354a9ac6bda6903aca20e5a369394d19b704ace17002007eba}
}]A non-\/critical error which might be useful for debugging. \index{UNSPECIFIED@{UNSPECIFIED}!RtError@{RtError}}\index{RtError@{RtError}!UNSPECIFIED@{UNSPECIFIED}}\item[{\em 
UNSPECIFIED\label{class_rt_error_ab04667aae01bffc354a9ac6bda6903aca444efd3ccf774b2ba9f9bde70ec71cd6}
}]The default, unspecified error type. \index{NO\_\-DEVICES\_\-FOUND@{NO\_\-DEVICES\_\-FOUND}!RtError@{RtError}}\index{RtError@{RtError}!NO\_\-DEVICES\_\-FOUND@{NO\_\-DEVICES\_\-FOUND}}\item[{\em 
NO\_\-DEVICES\_\-FOUND\label{class_rt_error_ab04667aae01bffc354a9ac6bda6903acaf267eb2d710f33d649ba840eeab6ff82}
}]No devices found on system. \index{INVALID\_\-DEVICE@{INVALID\_\-DEVICE}!RtError@{RtError}}\index{RtError@{RtError}!INVALID\_\-DEVICE@{INVALID\_\-DEVICE}}\item[{\em 
INVALID\_\-DEVICE\label{class_rt_error_ab04667aae01bffc354a9ac6bda6903acad6064062066fffdba258237a7c2159b1}
}]An invalid device ID was specified. \index{MEMORY\_\-ERROR@{MEMORY\_\-ERROR}!RtError@{RtError}}\index{RtError@{RtError}!MEMORY\_\-ERROR@{MEMORY\_\-ERROR}}\item[{\em 
MEMORY\_\-ERROR\label{class_rt_error_ab04667aae01bffc354a9ac6bda6903acab4f813e5a36905c89d4081a59497432e}
}]An error occured during memory allocation. \index{INVALID\_\-PARAMETER@{INVALID\_\-PARAMETER}!RtError@{RtError}}\index{RtError@{RtError}!INVALID\_\-PARAMETER@{INVALID\_\-PARAMETER}}\item[{\em 
INVALID\_\-PARAMETER\label{class_rt_error_ab04667aae01bffc354a9ac6bda6903acaa3eabf0f71120beaba94148a1b78fed6}
}]An invalid parameter was specified to a function. \index{INVALID\_\-USE@{INVALID\_\-USE}!RtError@{RtError}}\index{RtError@{RtError}!INVALID\_\-USE@{INVALID\_\-USE}}\item[{\em 
INVALID\_\-USE\label{class_rt_error_ab04667aae01bffc354a9ac6bda6903aca8e65f51a3fbdc1a4a1552b3260df36bc}
}]The function was called incorrectly. \index{DRIVER\_\-ERROR@{DRIVER\_\-ERROR}!RtError@{RtError}}\index{RtError@{RtError}!DRIVER\_\-ERROR@{DRIVER\_\-ERROR}}\item[{\em 
DRIVER\_\-ERROR\label{class_rt_error_ab04667aae01bffc354a9ac6bda6903aca995e97ecf6beeedaba525022a63aec6b}
}]A system driver error occured. \index{SYSTEM\_\-ERROR@{SYSTEM\_\-ERROR}!RtError@{RtError}}\index{RtError@{RtError}!SYSTEM\_\-ERROR@{SYSTEM\_\-ERROR}}\item[{\em 
SYSTEM\_\-ERROR\label{class_rt_error_ab04667aae01bffc354a9ac6bda6903aca8947d0a2e2a84ecf3646271844e06a6b}
}]A system error occured. \index{THREAD\_\-ERROR@{THREAD\_\-ERROR}!RtError@{RtError}}\index{RtError@{RtError}!THREAD\_\-ERROR@{THREAD\_\-ERROR}}\item[{\em 
THREAD\_\-ERROR\label{class_rt_error_ab04667aae01bffc354a9ac6bda6903acaeb6282f991e2d93ab294a4272fc3f6c6}
}]A thread error occured. \end{description}
\end{Desc}



The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
Include/RtError.h\end{DoxyCompactItemize}
